home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
CHAIN.SCR
< prev
next >
Wrap
Text File
|
1991-12-13
|
2KB
|
62 lines
.pg wi full clr cy
COMMAND NAME»gray«: »%t« Chain »ye«
/CHAIN {path} {command line}
/cw
»%t«Chain»#« stops »%t«DO»#« processing and turns control over to the
program identified by »cy«{path}»#« passing it the »cy«{command line}»#«.
»%t«Chain»#« is similar to »%t«DoIt»#« except that »%t«DO»#« stops processing at
the point it encounters the »%t«/CHAIN»#« command.
»wh«{path}»#« Must be the name of the program »ye«INCLUDING»#« the
»gr«EXTENSION»#«. If no directories are included, »%t«DO»#«
will search the current »ye«DOS PATH»#« for the
program.
»wh«{command line}»#« The command line to be passed to the program.
Varlables in »cy«{path}»#« and »cy«{command line}»#« are expanded.
.pg clr
Here are some examples:
»wh«
/CHAIN list.com %%myfile»#«
Start »ye«LIST.COM»#« to display the file(s) defined in »cy«%%MYFILE»#«.
»wh«
/CHAIN DO.exe»#«
Start the »%t«DO»#« program again in interactive mode.
»wh«
/CHAIN %%pathname "/A /B"»#«
Start the program defined in »cy«%%PATHNAME»#« and pass it the
command line. Note that the command line is enclosed in
»ye«quotes»#« since it contains spaces.
.pg
At this point we will execute a »%t«/CHAIN»#« command. It will execute
the File »wh«CHAIN.BAT»#« which we will create and then return to the
tutorial script. Press »bo«<enter>»#« to execute the »%t«Chain»#« command.
/OPEN 1 CHAIN.BAT W
/WRITE 1 "ECHO Off"
/WRITE 1 "ECHO ┌─────────────────────────────────┐"
/WRITE 1 "ECHO │ Batch file for testing Chaining │"
/WRITE 1 "ECHO └─────────────────────────────────┘"
/WRITE 1 "ECHO ."
/WRITE 1 "DIR *.EXE /W /P"
/WRITE 1 "ECHO ."
/WRITE 1 "ECHO ┌───────────────────────────────┐"
/WRITE 1 "ECHO │ Batch file Complete │"
/WRITE 1 "ECHO │ Now returning to the tutorial │"
/WRITE 1 "ECHO └───────────────────────────────┘"
/WRITE 1 "PAUSE"
/WRITE 1 "ECHO ."
/WRITE 1 "DO TUTORIAL CHAIN2"
/CLOSE 1
Notice that a »cy«BAT»#«ch file has to be run with »ye«COMMAND.COM»#«. If
this is not done, the »%t«Chain»#« command will hang.
|/CHAIN C:\COMMAND.COM "/C CHAIN.BAT"
/ENDEXEC